import sys 
import numpy as np
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()

# Get the argv from command-line
n = int(sys.argv[1])
randNum = np.zeros(n)
if rank == 0:
    randNum = np.random.random_sample(n)
    print(f"Process {rank} draw the number {randNum}")
    comm.Send(randNum, dest=1, tag=11)
if rank == 1:
    print(f"Process {rank} before receiving has the number {randNum}")
    comm.Recv(randNum, source=0, tag=11)
    print(f"Process {rank} received the number {randNum}")